<div class="ng-cloak ng-table-pager"
  ng-show="params.settings().enablePagination">
  <div ng-if="params.settings().counts.length"
    class="ng-table-counts btn-group pull-right">
    <button ng-repeat="count in params.settings().counts"
      type="button"
      ng-class="{
        'active':params.count()==count
      }"
      ng-click="params.count(count)"
      class="btn btn-default">
      <span ng-bind="count"></span>
    </button>
  </div>
  <ul ng-if="pages.length"
    class="pagination ng-table-pagination">
    <li class="total-text"
      ng-if="params.settings().totalText !== false">
      <span ng-compile="params.settings().totalText"></span>
    </li>
    <li class="page-item"
      ng-class="{
        'disabled': !page.active && !page.current,
        'active': page.current
      }"
      ng-repeat="page in pages"
      ng-switch="page.type">
      <a class="page-link"
        ng-switch-when="prev"
        ng-click="params.page(page.number)"
        href="">&laquo;</a>
      <a class="page-link"
        ng-switch-when="first"
        ng-click="params.page(page.number)"
        href="">
        <span ng-bind="page.number"></span>
      </a>
      <a class="page-link"
        ng-switch-when="page"
        ng-click="params.page(page.number)"
        href="">
        <span ng-bind="page.number"></span>
      </a>
      <a class="page-link"
        ng-switch-when="more"
        ng-click="params.page(page.number)"
        href="">&#8230;</a>
      <a class="page-link"
        ng-switch-when="last"
        ng-click="params.page(page.number)"
        href="">
        <span ng-bind="page.number"></span>
      </a>
      <a class="page-link"
        ng-switch-when="next"
        ng-click="params.page(page.number)"
        href="">&raquo;</a>
    </li>
  </ul>
</div>
